﻿using ProductMonitor.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ProductMonitor.MyUserControl
{
    /// <summary>
    /// MonitorUC.xaml 的交互逻辑
    /// </summary>
    public partial class MonitorUC : UserControl
    {
        public MonitorUC()
        {
            InitializeComponent();
            //this.DataContext = new MainWindowVM();
            //var viewModel = DataContext as MainWindowVM;
            //Task.Run(() => {
            //    while (true)
            //    {
            //        Thread.Sleep(1000);
            //        Application.Current.Dispatcher.Invoke(() =>
            //        {
            //            if (viewModel != null)
            //            {
            //                viewModel.TimeStr = DateTime.Now.ToString("HH:mm:ss");
            //            }
            //        });
            //    }
            //});
        }
    }
}
